package haemers.reflection.tests 
{
	import flash.utils.describeType;
	import flash.utils.Dictionary;
	import haemers.reflection.data.vo.MethodVO;
	import nl.haemers.data.reflection.Methods;
	import org.flexunit.Assert;
	/**
	 * ...
	 * @author Jonathan
	 */
	public class MethodsTest 
	{
		private var _methodVO:MethodVO;
		private var _description:XML;
		
		private var _methods:Methods;
		/** Public methods **/
		[Before]
		public function setup() : void
		{
			_methodVO = new MethodVO();
			_description = describeType(_methodVO);
			
			_methods = new Methods(_description);
		}
		
		[Test]
		public function testCollection() : void
		{
			Assert.assertNotNull(_methods.getMethods());
			Assert.assertTrue(_methods.getMethods() is Dictionary);
			Assert.assertNotNull(_methods.getMethods()["addName"]);
		}
		
		[Test]
		public function testLookUp() : void
		{
			Assert.assertTrue(_methods.hasMethod("addName"));
			Assert.assertNotNull(_methods.getMethod("addName"));
			
			Assert.assertTrue(_methods.hasMethod("ignoreMe"));
			Assert.assertNotNull(_methods.getMethod("ignoreMe"));
		}
		
		[After]
		public function teardown() : void
		{
			_methods = null;
			
			_description = null;
			_methodVO = null;
		}
		/** Getters & Setters **/
		
		/** Protected methods **/
		
		/** Private methods **/
	}

}